package ch.idsia.ai.agents.controllers.myai;

import java.util.Vector;

/**
 * Created by IntelliJ IDEA.
 * User: blakekl10
 * Date: Jun 15, 2010
 * Time: 2:05:18 PM
 * To change this template use File | Settings | File Templates.
 */
public class Node
{
    private String name;
    private int pointValue;
    private Vector nodeList;

    public Node()
    {
        pointValue = 0;
        name = "";
        nodeList = new Vector();
        nodeList.clear();
    }

    public Node(String data)
    {
        this();
        name = data;
    }

    public Node(String data, int point)
    {
        this(data);
        pointValue = point;
    }
    
    public boolean addNode(Node child)
    {
        return nodeList.add(child);
    }

    public int getNumberOfChildren()
    {
        return nodeList.size();
    }

    public String getName()
    {
        return name;
    }

    public Node getNode(int num)
    {
        return (Node) nodeList.get(num);
    }

    public void removeNode(int position)
    {
        nodeList.remove(position);
    }

    public int getPointValue()
    {
        return pointValue;
    }
}
